class Tiger:
    type ='猫'

    def setName(self, name):
        self.__name = name

    def setAge(self, age):
        # 需要对年龄进行限定
        if age < 0:
            self.__age = 0
        elif age > 10:
            self.__age = 10
        else:
            self.__age = age
        # 获取属性值

    def getName(self):
        return self.__name

    def getAge(self):
        return self.__age

    def run(self):
        print(f"{self.__name} 四条腿狂奔")

    def __str__(self):
        return f"{self.__name} 的品种为{Tiger.type},年龄为{self.__age}"